home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / Delphi 3.0 / DATA.Z / isapiapp.int < prev    next >
Encoding:
Text File  |  1997-01-30  |  2.4 KB  |  59 lines

  1. unit ISAPIApp;
  2.  
  3. interface
  4.  
  5. uses Windows, Classes, HTTPApp, ISAPI2;
  6.  
  7. type
  8.   TISAPIRequest = class(TWebRequest)
  9.   protected
  10.     function GetStringVariable(Index: Integer): string; override;
  11.     function GetDateVariable(Index: Integer): TDateTime; override;
  12.     function GetIntegerVariable(Index: Integer): Integer; override;
  13.   public
  14.     constructor Create(AECB: PEXTENSION_CONTROL_BLOCK);
  15.     function GetFieldByName(const Name: string): string; override;
  16.     function ReadClient(var Buffer; Count: Integer): Integer; override;
  17.     function ReadString(Count: Integer): string; override;
  18.     function TranslateURI(const URI: string): string; override;
  19.     function WriteClient(var Buffer; Count: Integer): Integer; override;
  20.     function WriteString(const AString: string): Boolean; override;
  21.     property ECB: PEXTENSION_CONTROL_BLOCK;
  22.   end;
  23.  
  24.   TISAPIResponse = class(TWebResponse)
  25.   protected
  26.     function GetContent: string; override;
  27.     function GetDateVariable(Index: Integer): TDateTime; override;
  28.     function GetIntegerVariable(Index: Integer): Integer; override;
  29.     function GetLogMessage: string; override;
  30.     function GetStatusCode: Integer; override;
  31.     function GetStringVariable(Index: Integer): string; override;
  32.     function Sent: Boolean; override;
  33.     procedure SetContent(const Value: string); override;
  34.     procedure SetDateVariable(Index: Integer; const Value: TDateTime); override;
  35.     procedure SetIntegerVariable(Index: Integer; Value: Integer); override;
  36.     procedure SetLogMessage(const Value: string); override;
  37.     procedure SetStatusCode(Value: Integer); override;
  38.     procedure SetStringVariable(Index: Integer; const Value: string); override;
  39.   public
  40.     constructor Create(HTTPRequest: TWebRequest);
  41.     procedure SendResponse; override;
  42.     procedure SendRedirect(const URI: string); override;
  43.     procedure SendStream(AStream: TStream); override;
  44.   end;
  45.  
  46.   TISAPIApplication = class(TWebApplication)
  47.   public
  48.     // These are the entry points relayed from the ISAPI DLL imports
  49.     function GetExtensionVersion(var Ver: THSE_VERSION_INFO): BOOL;
  50.     function HttpExtensionProc(var ECB: TEXTENSION_CONTROL_BLOCK): DWORD;
  51.     function TerminateExtension(dwFlags: DWORD): BOOL;
  52.   end;
  53.  
  54. function GetExtensionVersion(var Ver: THSE_VERSION_INFO): BOOL; stdcall;
  55. function HttpExtensionProc(var ECB: TEXTENSION_CONTROL_BLOCK): DWORD; stdcall;
  56. function TerminateExtension(dwFlags: DWORD): BOOL; stdcall;
  57.  
  58. implementation
  59.